package dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import entity.Classroom;
import entity.example.ClassroomExample;

public interface ClassroomMapper {
    long countByExample(ClassroomExample example);

    int deleteByExample(ClassroomExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Classroom record);

    int insertSelective(Classroom record);

    List<Classroom> selectByExample(ClassroomExample example);

    Classroom selectByPrimaryKey(Integer id);

    /**
     * 根据时间段选择空闲教室
     * @param start_time 开始时间
     * @param end_time 结束时间
     * @return 空闲教室列表，其中包含教学楼信息
     */
    List<Classroom> selectFree(@Param("start_time") Date start_time,@Param("end_time") Date end_time);


    /**
     * 查询所有的教室
     * @return
     */
    List<Classroom> selectAll();

    int updateByExampleSelective(@Param("record") Classroom record, @Param("example") ClassroomExample example);

    int updateByExample(@Param("record") Classroom record, @Param("example") ClassroomExample example);

    int updateByPrimaryKeySelective(Classroom record);

    int updateByPrimaryKey(Classroom record);
}